import {
  defineStore
} from "pinia";
import {
  getRegionservice
} from "@/services";
const useUserInfo = defineStore("userInfo", {
  state: () => ({
    is_wx: 0, //默认是0未绑定openid，当为1的时候为绑定过的状态
  }),
  actions: {
    async getInfo() {
      const res = await getRegionservice()
      this.is_wx = res.data.is_wx
      
    }
  },
  persist: {
    enabled: true,
  }
})

export default useUserInfo